package ac.github.os.internal.core.condition.impl.common

import ac.github.os.internal.core.condition.Condition
import ac.github.os.internal.core.config.StringConfig
import ac.github.os.internal.core.config.get
import ac.github.os.internal.session.Session
import taboolib.common.platform.Awake
import taboolib.common.util.random

@Awake
class RandomCondition : Condition {

    override fun doScreen(session: Session, config: StringConfig): Boolean {
        val get = config.get("val", 0.5, true)!!
        return random(get)
    }

    override val namespace: String
        get() = "random"
}